package controllers;

import play.*;
import play.mvc.*;
import play.mvc.Http.*;

import models.*;

public class ManagerSecured extends StaffSecured {

    @Override
    public String getUsername(Context ctx) {
		String loggedUser = super.getUsername(ctx);
		
		String uuid = ctx.session().get("uuid");
		Integer role = LogSession.getRoleFromUUID(uuid);

		if (role == null || role != 1)
			return null;		
			
        return loggedUser;
    }  
	
}